﻿using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IPosition
    {
        [OperationContract]
        int Position_Using(int PositionID);

        [OperationContract]
        DataSet Position_GetAll();

        [OperationContract]
        PositionInfo Position_GetInfo(int PositionID);

        [OperationContract]
        DataSet Position_GetByBranchCode(string _BranchCode);

        [OperationContract]
        DataSet Position_GetByBranchID(int _Branch_ID);
        
        [OperationContract]
        DataSet Position_GetList(out int ItemCount, int currentPage, int pageSize, string _BranchCode);

        [OperationContract]
        int Position_Insert(PositionInfo eInfo);

        [OperationContract]
        bool Position_Update(PositionInfo eInfo);

        [OperationContract]
        bool Position_Delete(int PositionID);
    }
    [DataContract(Namespace = "http://HRMService")]
    public class PositionInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        string _Name;
        [DataMember]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }
        string _BranchCode;
        [DataMember]
        public string BranchCode
        {
            get { return _BranchCode; }
            set { _BranchCode = value; }
        }
    }
}
